package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.YzrPurchOrderDet;

public interface IYzrPurchOrderDetDAO extends CrudRepository<YzrPurchOrderDet, String> {

	//找出最大编号
	@Query("select max(pod.purchOrderDetId) from YzrPurchOrderDet pod where pod.purchOrderDetId like ?1%")
    public String findID(String a);
	
	//根据订单id查找订单明细
	@Query("select pod from YzrPurchOrderDet pod where pod.orderDetOrderId=?1")
	public List<YzrPurchOrderDet> findOrderDetByOrderId(String orderId,Pageable pageable);
	
	//根据订单id查找订单明细
	@Query("select pod from YzrPurchOrderDet pod where pod.orderDetOrderId=?1")
	public List<YzrPurchOrderDet> findOrderDetByOrderId2(String orderId);
}
